				let currentTab = 0
				const tabs = Array.from(document.querySelectorAll('.tabs-main__tab'))
				const btns = document.querySelectorAll('.cardList__btn')
				
				btns.forEach(btn => 
					btn.addEventListener('click', e => {
						const button = e.target.closest('.btn')

						if (button.classList.contains('btn--left')) {
							currentTab--
							if (currentTab < 0) currentTab = 2

							tabs.forEach(tab => tab.style.display = 'none')
							tabs[currentTab].style.display = 'block'
						} else if (button.classList.contains('btn--right')) {
							currentTab++
							if (currentTab > 2) currentTab = 0
							
							tabs.forEach(tab => tab.style.display = 'none')
							tabs[currentTab].style.display = 'block'
						}
					})
				)